package com.per.mybootall.projectInit;

import com.per.mybootall.webService.server.ServerHello;
import lombok.extern.slf4j.Slf4j;
import org.mortbay.log.Log;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.xml.ws.Endpoint;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: yyy
 * Date: 2021/11/16
 * Time: 16:08
 * Description: 项目初始化执行该方法
 */
@Slf4j
@Component
public class InitProject implements ApplicationListener {
    @Bean
    public void tets(){
        Endpoint.publish("http://127.0.0.1:8989/Server/ServerHello",new ServerHello());
        System.out.println("webservice发布成功--->>>>>");
    }

    @Override
    public void onApplicationEvent(ApplicationEvent applicationEvent) {

    }
}
